<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <script src="./lib/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <div style="width: 100px;height: 100px;background:blue"></div>
            <!-- css内联样式变量拼接 -->
            <div style="width: 100px;height: 100px;" :style="{borderRadius:'40%',backgroundColor:'yellow',fontSize:'20px',border: borderWidth + 'px solid red'}">哈</div>
            <!-- border: borderWidth + 'px solid red'   通过变量可以拼接 -->
            <hr>
            <!-- css内联样式放置对象 -->
            <div :style="styleObj">和</div>
            <!-- css数组的方式拼接 -->
            <div :style="styleArr">和</div>
        </div>
    </body>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                borderWidth:50,
                styleObj:{
                    width:"200px",
                    height:"300px",
                    "background-color":"pink",
                    fontSize:"88px"
                },
                styleArr:[
                    {
                        width:"200px",
                        height:"300px",
                        "background-color":"pink",
                        fontSize:"88px"
                    },
                    {
                        border:'10px solid green'
                    }
                ]
            }
        })
    </script>
</html>